<div class="layui-card">
    <div class="layui-card-body">
        <form class="layui-form" action="" method="post" id="cp-form" enctype="multipart/form-data">
            <div class="layui-tab">
                <ul class="layui-tab-title">
                    <li class="layui-this">基础</li>
                    <li>SEO设置</li>
                </ul>
                <div class="layui-tab-content">
                    <div class="layui-tab-item layui-show">
                        <div class="layui-form-item">
                            <label class="layui-form-label">应用名称 <span class="request-tips">*</span></label>
                            <div class="layui-input-block">
                                <input type="text" name="app_name"  value="" required lay-verify="required" placeholder="应用名称" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">下载次数 <span class="request-tips">*</span></label>
                            <div class="layui-input-block">
                                <input type="text" name="app_install"  value="1" required lay-verify="required" placeholder="下载次数" autocomplete="off" class="layui-input">
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">应用状态 <span class="request-tips">*</span></label>
                            <div class="layui-input-block">
                                <input type="radio" name="app_status" class="layui-input" title="上架" value="1" checked>
                                <input type="radio" name="app_status" class="layui-input" title="下架" value="0" {if isset($app.app_status) and $app.status eq 0}checked{/if}>
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">是否收费 <span class="request-tips">*</span></label>
                            <div class="layui-input-block">
                                <div class="layui-col-md2">
                                    <input type="radio" name="is_free" class="layui-input" title="否" value="0" checked lay-filter="isfree">
                                    <input type="radio" name="is_free" class="layui-input" title="是" value="1" lay-filter="isfree" >
                                </div>
                                <div class="layui-col-md3 price" style="display: none">
                                    <input type="text" class="layui-input" placeholder="请填入价格" value="0" name="price">
                                    <div class="layui-word-aux">实际价格</div>
                                </div>
                                <div class="layui-col-md3 price" style="display: none">
                                    <input type="text" class="layui-input" placeholder="请填入划线价格" value="0" name="line_price">
                                    <div class="layui-word-aux">划线价格</div>
                                </div>
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">是否推荐 <span class="request-tips">*</span></label>
                            <div class="layui-input-block">
                                <input type="radio" name="is_reco" class="layui-input" title="否" value="0" checked>
                                <input type="radio" name="is_reco" class="layui-input" title="是" value="1" >
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">是否置顶 <span class="request-tips">*</span></label>
                            <div class="layui-input-block">
                                <input type="radio" name="is_top" class="layui-input" title="否" value="0" checked>
                                <input type="radio" name="is_top" class="layui-input" title="是" value="1" >
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">开启评论 <span class="request-tips">*</span></label>
                            <div class="layui-input-block">
                                <input type="radio" name="is_comment" class="layui-input" title="是" value="1" checked >
                                <input type="radio" name="is_comment" class="layui-input" title="否" value="0" >
                            </div>
                        </div>


                        <!--<div class="layui-form-item">
                            <label class="layui-form-label">发行阶段 <span class="request-tips">*</span></label>
                            <div class="layui-input-inline">
                                <select name="app_version_code" id="">
                                    <option value="1">Alpha初步版</option>
                                    <option value="2">Beta测试版</option>
                                    <option value="3">γ成熟版</option>
                                    <option value="4">Trial试用版</option>
                                    <option value="5">Unregistered未注册版</option>
                                    <option value="6">Demo演示版</option>
                                    <option value="7">Release正式版</option>
                                    <option value="8">Registered注册版</option>
                                </select>
                            </div>
                            <label class="layui-form-label">版本号 <span class="request-tips">*</span></label>
                            <div class="layui-input-inline">
                                <input type="text" name="app_version" required  lay-verify="required" placeholder="版本号" autocomplete="off" class="layui-input">
                            </div>
                            <label class="layui-form-label">应用状态 <span class="request-tips">*</span></label>
                            <div class="layui-input-block">
                                <input type="radio" name="app_status" class="layui-input" title="上架" value="1" checked>
                                <input type="radio" name="app_status" class="layui-input" title="下架" value="0" {if isset($app.app_status) and $app.status eq 0}checked{/if}>
                            </div>

                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">软件类型 <span class="request-tips">*</span></label>
                            <div class="layui-input-inline">
                                <select name="app_type">
                                    <option value="1">系统型软件</option>
                                    <option value="2" selected>应用型软件</option>
                                </select>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">平台支持 <span class="request-tips">*</span></label>
                            <div class="layui-input-block">
                                <input type="checkbox" title="其他" value="0" checked class="layui-input" name="support_category[]">
                                <input type="checkbox" title="手机安卓" value="1" class="layui-input" name="support_category[]">
                                <input type="checkbox" title="手机苹果" value="2" class="layui-input" name="support_category[]">
                                <input type="checkbox" title="电脑windows" value="3" class="layui-input" name="support_category[]">
                                <input type="checkbox" title="电脑Mac" value="4" class="layui-input" name="support_category[]">
                                <input type="checkbox" title="跨平台" value="5" class="layui-input" name="support_category[]">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">发行包 <span class="request-tips">*</span></label>
                            <div class="layui-input-inline">
                                <input type="text" class="layui-input" name="app_pack">
                            </div>
                            <div class="layui-input-inline">
                                <button type="button" class="layui-btn" id="test3">
                                    <i class="layui-icon">&#xe67c;</i>上传文件
                                </button>
                            </div>
                        </div>-->

                        <div class="layui-form-item">
                            <label class="layui-form-label">所属分类 <span class="request-tips">*</span></label>
                            <div class="layui-input-block">
                                <input type="hidden" name="parent_id" value="0">
                                <input type="hidden" name="category_id" value="0">
                                <input type="text" placeholder="所属分类" data-url="{:url('admin/steward.category/addcategory')}" class="layui-input menuLevel">
                            </div>

                        </div>


                        <div class="layui-form-item">
                            <label class="layui-form-label">应用封面 <span class="request-tips">*</span></label>
                            <div class="layui-input-block">
                                <button type="button" class="layui-btn" id="test1">
                                    <i class="layui-icon">&#xe67c;</i>上传封面
                                </button>
                            </div>
                            <div class="layui-input-block">
                                <table class="layui-table" id="app-photo">
                                    <!--<tr>
                                        <td>
                                            <input type="text" class="layui-input" name="app_photos[]">
                                        </td>
                                        <td>
                                            <a href="javascript:;" class="layui-btn layui-btn-danger layui-btn-xs">删除</a>
                                        </td>
                                    </tr>-->
                                </table>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">应用相册</label>
                            <div class="layui-input-block">
                                <button type="button" class="layui-btn" id="test2">
                                    <i class="layui-icon">&#xe67c;</i>上传相册
                                </button>
                            </div>
                            <div class="layui-input-block">
                                <table class="layui-table" id="app-photos">
                                    <!--<tr>
                                        <td>
                                            <input type="text" class="layui-input" name="app_photos[]">
                                        </td>
                                        <td>
                                            <a href="javascript:;" class="layui-btn layui-btn-danger layui-btn-xs">删除</a>
                                        </td>
                                    </tr>-->
                                </table>
                            </div>
                        </div>
                    </div>

                    <div class="layui-tab-item">
                        <div class="layui-form-item">
                            <label class="layui-form-label">SEO标题</label>
                            <div class="layui-input-block">
                                <input type="text" name="app_seo_title"  value=""  placeholder="SEO标题" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">SEO关键词</label>
                            <div class="layui-input-block">
                                <input type="text" name="app_seo_keywords"  value=""  placeholder="SEO关键词" autocomplete="off" class="layui-input">
                                <div class="layui-form-mid layui-word-aux">多个请用英文 , 隔开</div>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">SEO描述</label>
                            <div class="layui-input-block">
                                <textarea name="app_seo_desc" id="" cols="30" rows="10" class="layui-textarea"></textarea>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">软件介绍</label>
                            <div class="layui-input-block">
                                <script id="container" type="text/plain" name="app_contents"></script>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">购买说明</label>
                            <div class="layui-input-block">
                                <script id="buydesc" type="text/plain" name="buy_desc"></script>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <input type="hidden" name="user_id" value="{:get_user('id')}">
                    <div class="layui-text">带 * 号的为必填项</div>
                    <button class="layui-btn" lay-submit lay-filter="formDemo">保存</button>
                    <a href="javascript:history.go(-1);" class="layui-btn layui-btn-primary">返回</a>
                </div>
            </div>
        </form>
    </div>
</div>
